/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.uefs.cedoc.controle.civel;

import br.uefs.cedoc.controle.estante.*;
import br.uefs.cedoc.db.estante.DBEstante;

/**
 *
 * @author suporte
 */


import br.uefs.cedoc.controle.*;
import br.uefs.cedoc.db.exception.DBConnectionException;
import javax.servlet.*;
import javax.servlet.http.*;
import br.uefs.cedoc.db.*;
import br.uefs.cedoc.db.serie.DBSerie;
import br.uefs.cedoc.entidades.*;
import java.sql.SQLException;
import org.omg.PortableInterceptor.SYSTEM_EXCEPTION;
  
public class GetCivelCommand implements Command {
  private String next;

  public GetCivelCommand(String next) {
    this.next = next;
  }

    public String execute(HttpServletRequest req)
    throws CommandException {
        try {
            
            DBSerie dbserie = new DBSerie();
            SerieBean serie = new SerieBean();            
     
            serie = dbserie.getSerie("%civel");
            req.setAttribute("serie",serie);
            HttpSession session = req.getSession(true);
            session.setAttribute("serie",serie);

            } catch (SQLException ex) {
                ex.printStackTrace();
            } catch (DBConnectionException ex) {
                ex.printStackTrace();
            }

            req.setAttribute("status.msg", "tetes");
            
            return next;

    }
}


